package com.ruoyi.service.impl;

import com.ruoyi.domain.ChronicDisease;
import com.ruoyi.mapper.ChronicDiseaseMapper;
import com.ruoyi.service.IChronicDiseaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * diseaseService业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-11
 */
@Service
public class ChronicDiseaseServiceImpl implements IChronicDiseaseService 
{
    @Autowired
    private ChronicDiseaseMapper chronicDiseaseMapper;

    /**
     * 查询disease
     * 
     * @param dCid disease主键
     * @return disease
     */
    @Override
    public ChronicDisease selectChronicDiseaseByDCid(Long dCid)
    {
        return chronicDiseaseMapper.selectChronicDiseaseByDCid(dCid);
    }

    /**
     * 查询disease列表
     * 
     * @param chronicDisease disease
     * @return disease
     */
    @Override
    public List<ChronicDisease> selectChronicDiseaseList(ChronicDisease chronicDisease)
    {
        return chronicDiseaseMapper.selectChronicDiseaseList(chronicDisease);
    }

    /**
     * 新增disease
     * 
     * @param chronicDisease disease
     * @return 结果
     */
    @Override
    public int insertChronicDisease(ChronicDisease chronicDisease)
    {
        return chronicDiseaseMapper.insertChronicDisease(chronicDisease);
    }

    /**
     * 修改disease
     * 
     * @param chronicDisease disease
     * @return 结果
     */
    @Override
    public int updateChronicDisease(ChronicDisease chronicDisease)
    {
        return chronicDiseaseMapper.updateChronicDisease(chronicDisease);
    }

    /**
     * 批量删除disease
     * 
     * @param dCids 需要删除的disease主键
     * @return 结果
     */
    @Override
    public int deleteChronicDiseaseByDCids(Long[] dCids)
    {
        return chronicDiseaseMapper.deleteChronicDiseaseByDCids(dCids);
    }

    /**
     * 删除disease信息
     * 
     * @param dCid disease主键
     * @return 结果
     */
    @Override
    public int deleteChronicDiseaseByDCid(Long dCid)
    {
        return chronicDiseaseMapper.deleteChronicDiseaseByDCid(dCid);
    }
}
